<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="box">
    <ul>
        <li>
            <img src="./img/coffee-01.jpg" alt="">
        </li>
        <li>
            <img src="./img/coffee-02.jpg" alt="">
        </li>
        <li>
            <img src="./img/coffee-03.jpg" alt="">
        </li>
        <li>
            <img src="./img/coffee-04.jpg" alt="">
        </li>
        <li>
            <img src="./img/coffee-05.jpg" alt="">
        </li>
    </ul>
</div>
</body>
<style>
    * {
        margin: 0;
        padding: 0;
    }
    /* 设置轮播的宽高，溢出隐藏 */

    #box {
        margin: 100px auto;
        width: 1080px;
        height: 720px;
        overflow: hidden;
    }
    /* ul宽为所有轮播的宽 启动动画效果  */

    #box ul {
        width: 500%;
        animation: s 10s infinite;
    }
    /* 设置li的宽与box一致，清除无序列表圆点样式，浮动*/

    #box ul li {
        width: 1080px;
        list-style: none;
        float: left;
    }
    /* 图片宽高一致 */

    #box ul li img {
        width: 100%;
        height: 100%;
    }
    /* 往左边平移百分比用平分每一张图*/

    @keyframes s {
        0% {
            transform: translateX(0);
        }
        25% {
            transform: translateX(-20%);
        }
        50% {
            transform: translateX(-40%);
        }
        75% {
            transform: translateX(-60%);
        }
        100% {
            transform: translateX(-80%);
        }
    }
</style>

</html>